//导入request.js请求工具
import request from '@/utils/request.js'
//查询分类列表
export const articleCategoryListService = () => {
  return request.get('/category');
}

//新增文章分类  发送数据类型为json
export const articleAddCategoryService = (categoryJsonData) => {
  return request.post('/category', categoryJsonData);
}

//修改文章分类  发送数据类型为json
export const articleUpdateCategoryService = (categoryJsonData) => {
  return request.put('/category', categoryJsonData);
}

//修改文章分类  发送数据url参数
export const articleDeleteCategoryService = (categoryId) => {
  return request.delete('/category?id=' + categoryId);
}

//文章管理
//分页查询文章列表  发送url参数
export const articlePageQueryService = (params) => {
  return request.get('/article', { params: params });
}

//新增文章  发送Json格式参数
export const articleAddService = (articleJsonData) => {
  return request.post('/article', articleJsonData);
}

//修改文章 发送Json格式数据
export const articleUpdateService = (articleJsonData) => {
  return request.put('/article', articleJsonData);
}

//删除文章 发送数据url参数
export const articleDeleteService = (articleId) => {
  return request.delete('/article?id=' + articleId);
}




